using System;
using UnityEngine;

public sealed class keychainPlugin
{
	private static bool createKeychainValue(string pass, string iden)
	{
		return false;
	}

	private static bool updateKeychainValue(string pass, string iden)
	{
		return false;
	}

	private static void deleteKeychainValue(string iden)
	{
	}

	private static string getKeychainValue(string iden)
	{
		return string.Empty;
	}

	public static void resetKeychain()
	{
	}

	public static int getKCValue(string id)
	{
		int num = 0;
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			if (getKeychainValue(id) != null)
			{
				return int.Parse(getKeychainValue(id));
			}
			return 0;
		}
		if (Application.platform == RuntimePlatform.OSXEditor)
		{
			return 0;
		}
		throw new NotSupportedException(Application.platform.ToString());
	}

	public static string getKCValueString(string id)
	{
		string empty = string.Empty;
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			if (getKeychainValue(id) != null)
			{
				return getKeychainValue(id);
			}
			return string.Empty;
		}
		if (Application.platform == RuntimePlatform.OSXEditor)
		{
			return string.Empty;
		}
		throw new NotSupportedException(Application.platform.ToString());
	}

	public static bool createKCValue(int val, string id)
	{
		bool result = false;
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			result = createKeychainValue(val.ToString(), id);
		}
		else if (Application.platform != 0)
		{
			throw new NotSupportedException(Application.platform.ToString());
		}
		return result;
	}

	public static bool createKCValue(string val, string id)
	{
		bool result = false;
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			result = createKeychainValue(val, id);
		}
		else if (Application.platform != 0)
		{
			throw new NotSupportedException(Application.platform.ToString());
		}
		return result;
	}

	public static bool updateKCValue(int val, string id)
	{
		bool result = false;
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			result = updateKeychainValue(val.ToString(), id);
		}
		else if (Application.platform != 0)
		{
			throw new NotSupportedException(Application.platform.ToString());
		}
		return result;
	}

	public static bool updateKCValue(string val, string id)
	{
		bool result = false;
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			result = updateKeychainValue(val, id);
		}
		else if (Application.platform != 0)
		{
			throw new NotSupportedException(Application.platform.ToString());
		}
		return result;
	}

	public static void deleteKCValue(string id)
	{
		if (Application.platform == RuntimePlatform.IPhonePlayer)
		{
			deleteKeychainValue(id);
		}
		else if (Application.platform != 0)
		{
			throw new NotSupportedException(Application.platform.ToString());
		}
	}
}
